//
//  HMDetailViewController.swift
//  Weibo
//
//  Created by ZhuDong on 16/5/20.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit


class HMDetailViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.whiteColor()
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        let popItem = UIBarButtonItem(title: "Next", style: .Plain, target: self, action: #selector(pop))
        navigationItem.rightBarButtonItem = popItem
       
    }
    func pop(){
        let nextVC = HMDetailViewController()
        navigationController?.pushViewController(nextVC, animated: true)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
